diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index 233a901..94961b5 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -5,9 +5,9 @@
  * An open source application development framework for PHP 5.1.6 or newer
  *
  * NOTICE OF LICENSE
- * 
+ *
  * Licensed under the Open Software License version 3.0
- * 
+ *
  * This source file is subject to the Open Software License (OSL 3.0) that is
  * bundled with this package in the files license.txt / license.rst.  It is
  * also available through the world wide web at this URL:
@@ -46,7 +46,7 @@
 	protected $_migration_version = 0;
 	protected $_migration_table = 'migrations';
 	protected $_migration_auto_latest = FALSE;
-	
+
 	protected $_error_string = '';
 
 	public function __construct($config = array())
@@ -71,7 +71,7 @@
 		}
 
 		// If not set, set it
-		$this->_migration_path == '' AND $this->_migration_path = APPPATH . 'migrations/';
+		$this->_migration_path == '' AND $this->_migration_path = APPPATH.'migrations/';
 
 		// Add trailing slash if not set
 		$this->_migration_path = rtrim($this->_migration_path, '/').'/';
@@ -85,7 +85,7 @@
 		// Make sure the migration table name was set.
 		if (empty($this->_migration_table))
 		{
-			show_error('Migrations configuration file (migration.php) must have "migration_table" set.');			
+			show_error('Migrations configuration file (migration.php) must have "migration_table" set.');
 		}
 
 		// If the migrations table is missing, make it
@@ -99,9 +99,9 @@
 
 			$this->db->insert($this->_migration_table, array('version' => 0));
 		}
-		
+
 		// Do we auto migrate to the latest migration?
-		if ( $this->_migration_auto_latest == TRUE )
+		if ($this->_migration_auto_latest == TRUE)
 		{
 			if ( ! $this->latest() )
 			{
@@ -140,7 +140,7 @@
 			// Moving Down
 			$step = -1;
 		}
-		
+
 		$method = $step === 1 ? 'up' : 'down';
 		$migrations = array();
 
@@ -148,7 +148,7 @@
 		// But first let's make sure that everything is the way it should be
 		for ($i = $start; $i != $stop; $i += $step)
 		{
-			$f = glob(sprintf($this->_migration_path . '%03d_*.php', $i));
+			$f = glob(sprintf($this->_migration_path.'%03d_*.php', $i));
 
 			// Only one migration per step is permitted
 			if (count($f) > 1)
@@ -189,7 +189,7 @@
 				}
 
 				include $f[0];
-				$class = 'Migration_' . ucfirst($match[1]);
+				$class = 'Migration_'.ucfirst($match[1]);
 
 				if ( ! class_exists($class))
 				{
@@ -212,7 +212,7 @@
 			}
 		}
 
-		log_message('debug', 'Current migration: ' . $current_version);
+		log_message('debug', 'Current migration: '.$current_version);
 
 		$version = $i + ($step == 1 ? -1 : 0);
 
@@ -222,13 +222,13 @@
 			return TRUE;
 		}
 
-		log_message('debug', 'Migrating from ' . $method . ' to version ' . $version);
+		log_message('debug', 'Migrating from '.$method.' to version '.$version);
 
 		// Loop through the migrations
 		foreach ($migrations AS $migration)
 		{
 			// Run the migration class
-			$class = 'Migration_' . ucfirst(strtolower($migration));
+			$class = 'Migration_'.ucfirst(strtolower($migration));
 			call_user_func(array(new $class, $method));
 
 			$current_version += $step;
@@ -257,7 +257,7 @@
 		}
 
 		$last_migration = basename(end($migrations));
-		
+
 		// Calculate the last migration step from existing migration
 		// filenames and procceed to the standard version migration
 		return $this->version((int) substr($last_migration, 0, 3));
@@ -300,9 +300,9 @@
 	protected function find_migrations()
 	{
 		// Load all *_*.php files in the migrations path
-		$files = glob($this->_migration_path . '*_*.php');
+		$files = glob($this->_migration_path.'*_*.php');
 		$file_count = count($files);
-		
+
 		for ($i = 0; $i < $file_count; $i++)
 		{
 			// Mark wrongly formatted files as false for later filtering
@@ -312,7 +312,7 @@
 				$files[$i] = FALSE;
 			}
 		}
-		
+
 		sort($files);
 
 		return $files;
